﻿using System;
using System.Collections.Generic;
using System.Text;
using SuperListEx.Sections;

namespace SuperListEx
{
    /// <summary>
    /// Used by PreviewListStyle
    /// </summary>
    public class MySectionFactory : SectionFactory
    {
        public getPreviewText getText;
        private PreviewStyle _style;

        public MySectionFactory(PreviewStyle style, getPreviewText getText)
        {
            _style = style;
            this.getText = getText;
        }

        public override RowSection CreateRowSection(ListControl listControl, RowIdentifier rowIdentifier, HeaderSection headerSection, int position)
        {
            return new MyRowSection(listControl, rowIdentifier, headerSection, position, _style, getText);
        }        
    }
}
